<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<header class="page">
    <div class="status">

        <ul class="nav justify-content-end">
        <a href="${ctxPath}/topic/list"><li class="image"></li></a>

            <c:choose>
                <%--若会话对象中存在customer则认为用于已经登录--%>
                <c:when test="${ not empty sessionScope.customer }">
                    <li class="nav-item">当时在线人数:${count}</li>
                    
                    <li class="nav-item">${message_password}</li>
                    <li class="nav-item">登陆成功,欢迎你  ${customer.nickname}</li>
                    <li class="nav-item">
                        <a href="${ctxPath}/customer/buy">购买经验值</a>
                    </li>
                    <li class="nav-item">
                        <a href="${ctxPath}/topic/publish">发布话题</a>
                    </li>
                    <li class="nav-item">
                        <a href="${ctxPath}/customer/my_page"><i class="fa fa-cog"> 个人主页</i></a>

                    </li>

                    <li class="nav-item">
                        <a href="${ctxPath}/customer/sign/out">退出</a>
                    </li>
                </c:when>
                <c:otherwise>
                    <li class="nav-item">
                        <a href="${ctxPath}/customer/sign/up">注册</a>
                    </li>
                    <li class="nav-item">
                        <a href="${ctxPath}/customer/sign/in">登录</a>
                    </li>
                </c:otherwise>
            </c:choose>
        </ul>
    </div>
    <div class="logo">
        <div class="logo"></div>
        <div class="ad"></div>
    </div>
</header>